import request from '@/router/axios'

export function save (data) {
  return request({
    url: '/rfidequipment',
    method: 'post',
    data:data
  })
}

export function edit (data) {
  return request({
    url: '/rfidequipment',
    method: 'put',
    data:data
  })
}

export function page (data) {
  return request({
    url: '/rfidequipment/page',
    method: 'get',
    params:data
  })
}

export function all (params) {
  return request({
    url: '/rfidequipment/all',
    method: 'get',
    params:params
  })
}

export function getRfidEquipmentById (id) {
  return request({
    url: '/rfidequipment/'+id,
    method: 'get',
  })
}

export function deleteById (id) {
  return request({
    url: '/rfidequipment/'+id,
    method: 'delete'
  })
}

export function bindRfidPower (data) {
  return request({
    url: '/rfidequipment/bindRfidPower',
    method: 'post',
    data:data
  })
}

export function getRfidRecords (data) {
  return request({
    url: '/rfidrecord/page',
    method: 'get',
    params:data
  })
}

export function command (data) {
  return request({
    url: '/rfid/exchange',
    method: 'post',
    data:data
  })
}
